package com.hfzy.ihk.web.userCenter.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hfzy.ihk.facade.userCenter.entity.UserHasRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wws
 * @since 2018-12-28
 */
public interface UserHasRoleMapper extends BaseMapper<UserHasRole> {

    int saveUserHasRole(@Param("userId") Long userId, @Param("roleIds") List<Long> roleIds);


    @Select("delete from user_has_role where user_id = #{userId}")
    void deleteUserHasRoleByUserId(Long userId);

}
